package net.osweb.core.tools.utils.crm;

import net.osweb.core.fw.exception.ServiceException;
import net.osweb.core.fw.service.MemCachedManager;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class CommonFunction {
	private static Log log = LogFactory.getLog(CommonFunction.class);
	
	/**
	 * 写缓存
	 * @param key 键
	 * @param value 值
	 */
	public static void writeCache(String key,Object value){
		try{
			MemCachedManager mem = MemCachedManager.getInstance();
			mem.add(key, value);
		}catch(Exception e){
			log.error(e);
			throw new ServiceException(e);
		}
	}
}
